from django.urls import converters

class UsernameConverter:
    regex='[a_zA_Z0_9_-]{5,20}'

    def to_python(self,value):
        return value